'use strict';
var express = require('express');
var router = express.Router();


/* GET home page. */
router.get('/', function (req, res) {
    res.json({
        title: 'Server status',
    });
});

router.post('/', (req, res) => {
    if (req.body.username == "root" && req.body.password == "root") {
        return res.json({ "status": 20000 })
    }
    return res.json({ status: 40000 })
})

module.exports = router;